
#pragma once

#include "reader.h"


struct IMessage
{
    virtual ~IMessage(){}
    virtual void sendCast(Reader& reader) = 0;
};

template<typename T>
struct TypedMessage : IMessage
{
    TypedMessage()
        :data()
    {}

    void sendCast(Reader& reader)
        { reader.takeMessage(*this); }

    T data;
};


